<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="/classes/DBHelper.class.jsp"%>
<%@ include file="/classes/CommonHelper.class.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	pageContext.setAttribute("basePath", basePath);
%>

<%
	//获取数据
	String zyfw_id = request.getParameter("zyfw_id");
	String sql = "SELECT * FROM APP_ZYFW t WHERE t.zyfw_id = ?";
	Map<String, Object> zyfw = getObject(sql, new Object[]{zyfw_id});
	pageContext.setAttribute("zyfw", zyfw);
%>
<!DOCTYPE html>
<html>
<head>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>志愿服务</title>

<%-- <script type='text/javascript' src="${basePath }plugins/jquery/jquery-1.12.2.min.js"></script> --%>
<link rel="stylesheet" href="${basePath }plugins/layui/v1.0.9/css/layui.css" media="all">
<link rel="stylesheet" href="css/jxw_css.css" />
<style type="text/css">
.question, .answer {
	overflow: hidden;
	width: 350px;
	display: inline-block;
	text-overflow: ellipsis;
	white-space: nowrap;
}

th {
	background-color: #f2f2f2;
}
</style>
</head>
<body>
	<iframe id="top" name="top" title="网站头部" width="100%" height="211" src="/snxf/toub/top.shtml" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
	<div class="secmain w1000 ovhid">
		<div class="secleft l ">
			<div class="wdbox">
				<table class="layui-table" style="width: 95%; margin: 10px auto;">
					<tr>
						<th style="background-color: red; color: white;">问题</th>
					</tr>
					<tr>
						<th style="font-weight: normal;">发表人：${zyfw.name } 提问时间： <fmt:formatDate value="${zyfw.create_time }" pattern="yyyy-MM-dd HH:mm:ss" /></th>
					</tr>
					<tr>
						<td style="padding: 20px;">
							<table class="layui-table" style="width: 100%; margin: 10px auto; background-color: rgb(242, 242, 242);">
								<tr>
									<td style="padding: 10px 50px;">
										<span style="font-weight: bold; color: #CC0000;">标题：</span>${zyfw.title }</td>
								</tr>
								<tr>
									<td style="padding: 10px 50px;">
										<span style="font-weight: bold; color: #CC0000;">内容：</span>${zyfw.content }</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<c:if test="${zyfw.status ne 'A' }">
					<table class="layui-table" style="width: 95%; margin: 10px auto;">
						<tr>
							<th style="background-color: red; color: white;">反馈</th>
						</tr>
						<tr>
							<th style="font-weight: normal;">回复时间： <fmt:formatDate value="${zyfw.reply_time }" pattern="yyyy-MM-dd HH:mm:ss" /></th>
						</tr>
						<tr>
							<td style="padding: 20px;">
								<table class="layui-table" style="width: 100%; margin: 10px auto; background-color: rgb(242, 242, 242)">
									<tr>
										<td style="padding: 10px 50px;">
											<span style="font-weight: bold; color: #CC0000;">内容：</span>${zyfw.reply }</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</c:if>
			</div>
		</div>
		<jsp:include page="zyfw_right.jsp"></jsp:include>
	<jsp:include page="zyfw_bottom.jsp"></jsp:include>
	<script type="text/javascript" src="${basePath }plugins/layui/v1.0.9/layui.js"></script>
	<script type='text/javascript'>
		// 		layui.use('form', function() {
		// 			var $ = layui.jquery, form = layui.form();

		// 			//全选
		// 			form.on('checkbox(allChoose)', function(data) {
		// 				var child = $(data.elem).parents('table').find(
		// 						'tbody input[type="checkbox"]');
		// 				child.each(function(index, item) {
		// 					item.checked = data.elem.checked;
		// 				});
		// 				form.render('checkbox');
		// 			});

		// 		});
	</script>
</body>
</html>